(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

fst(0, Z) → nil
fst(s(X), cons(Y, Z)) → cons(Y, n__fst(activate(X), activate(Z)))
from(X) → cons(X, n__from(s(X)))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
len(nil) → 0
len(cons(X, Z)) → s(n__len(activate(Z)))
fst(X1, X2) → n__fst(X1, X2)
from(X) → n__from(X)
add(X1, X2) → n__add(X1, X2)
len(X) → n__len(X)
activate(n__fst(X1, X2)) → fst(X1, X2)
activate(n__from(X)) → from(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__len(X)) → len(X)
activate(X) → X

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__from(z0)) → c12(FROM(z0))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__from(z0)) → c12(FROM(z0))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:none
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c12, c13, c14

(3) CdtGraphRemoveDanglingProof (ComplexityIfPolyImplication transformation)

Removed 1 of 7 dangling nodes:

ACTIVATE(n__from(z0)) → c12(FROM(z0))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:none
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

ADD(s(z0), z1) → c6(ACTIVATE(z0))
We considered the (Usable) Rules:none
And the Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = [2]x1   
POL(ADD(x1, x2)) = [1] + [2]x1 + x2   
POL(FST(x1, x2)) = [2]x1 + [2]x2   
POL(LEN(x1)) = [2]x1   
POL(c1(x1, x2)) = x1 + x2   
POL(c11(x1)) = x1   
POL(c13(x1)) = x1   
POL(c14(x1)) = x1   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   
POL(cons(x1, x2)) = x2   
POL(n__add(x1, x2)) = [2] + x1 + x2   
POL(n__fst(x1, x2)) = x1 + x2   
POL(n__len(x1)) = x1   
POL(s(x1)) = x1   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:

ADD(s(z0), z1) → c6(ACTIVATE(z0))
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = x1   
POL(ADD(x1, x2)) = x1   
POL(FST(x1, x2)) = x1 + x2   
POL(LEN(x1)) = [1] + x1   
POL(c1(x1, x2)) = x1 + x2   
POL(c11(x1)) = x1   
POL(c13(x1)) = x1   
POL(c14(x1)) = x1   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   
POL(cons(x1, x2)) = x2   
POL(n__add(x1, x2)) = x1   
POL(n__fst(x1, x2)) = [2] + x1 + x2   
POL(n__len(x1)) = [2] + x1   
POL(s(x1)) = x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:

ADD(s(z0), z1) → c6(ACTIVATE(z0))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(9) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:

ADD(s(z0), z1) → c6(ACTIVATE(z0))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(11) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = [4] + [4]x1   
POL(ADD(x1, x2)) = [3] + [4]x1 + [3]x2   
POL(FST(x1, x2)) = [3] + [4]x1 + [4]x2   
POL(LEN(x1)) = [3] + [4]x1   
POL(c1(x1, x2)) = x1 + x2   
POL(c11(x1)) = x1   
POL(c13(x1)) = x1   
POL(c14(x1)) = x1   
POL(c6(x1)) = x1   
POL(c9(x1)) = x1   
POL(cons(x1, x2)) = [5] + x2   
POL(n__add(x1, x2)) = x1 + x2   
POL(n__fst(x1, x2)) = [5] + x1 + x2   
POL(n__len(x1)) = [5] + x1   
POL(s(x1)) = [2] + x1   

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

fst(0, z0) → nil
fst(s(z0), cons(z1, z2)) → cons(z1, n__fst(activate(z0), activate(z2)))
fst(z0, z1) → n__fst(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
add(0, z0) → z0
add(s(z0), z1) → s(n__add(activate(z0), z1))
add(z0, z1) → n__add(z0, z1)
len(nil) → 0
len(cons(z0, z1)) → s(n__len(activate(z1)))
len(z0) → n__len(z0)
activate(n__fst(z0, z1)) → fst(z0, z1)
activate(n__from(z0)) → from(z0)
activate(n__add(z0, z1)) → add(z0, z1)
activate(n__len(z0)) → len(z0)
activate(z0) → z0
Tuples:

FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
ADD(s(z0), z1) → c6(ACTIVATE(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
ACTIVATE(n__len(z0)) → c14(LEN(z0))
S tuples:

ACTIVATE(n__len(z0)) → c14(LEN(z0))
K tuples:

ADD(s(z0), z1) → c6(ACTIVATE(z0))
ACTIVATE(n__fst(z0, z1)) → c11(FST(z0, z1))
FST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z0), ACTIVATE(z2))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
ACTIVATE(n__add(z0, z1)) → c13(ADD(z0, z1))
Defined Rule Symbols:

fst, from, add, len, activate

Defined Pair Symbols:

FST, ADD, LEN, ACTIVATE

Compound Symbols:

c1, c6, c9, c11, c13, c14

(13) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

ACTIVATE(n__len(z0)) → c14(LEN(z0))
LEN(cons(z0, z1)) → c9(ACTIVATE(z1))
Now S is empty

(14) BOUNDS(O(1), O(1))